home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / miscpas.zip / WORLDMAP.PAS < prev   
Pascal/Delphi Source File  |  1984-06-12  |  1KB  |  52 lines

  1. program Worldmap;
  2.  
  3. {  This program draws a project of the world's continents on the hires  }
  4. {  screen very rapidly.  The program uses the external procedure        }
  5. {  LINE.INV which must reside on the default disk in order to compile   }
  6. {  the program.  The program also uses an external data file which      }
  7. {  holds the map coordinates: WORLDMAP.DAT.                             }
  8.  
  9. {  Jeff Firestone.  June, 1984.                                         }
  10.  
  11. Const
  12.   ArSize = 1280;
  13. var
  14.   n,x,x1,y,y1,i,j : integer;
  15.   WorldArray : array [0..ArSize] of integer;
  16.   f : file;
  17.  
  18. procedure line(a,b,c,d,e:integer); external 'line.inv';
  19.  
  20. procedure ReadInfo;
  21. begin
  22.   FillChar(WorldArray, SizeOf(WorldArray), 0);
  23.   assign(f, 'worldmap.dat');
  24.   reset(f);
  25.   BlockRead(f, WorldArray, round((ArSize/128)*2));
  26.   close(f);
  27. end;
  28.  
  29.  
  30. begin
  31.   ReadInfo;
  32.   i:= 0;
  33.   hires;  hirescolor(7);
  34.   n:= WorldArray[i]; i:=i+1;
  35.   repeat
  36.     x1:= WorldArray[i]; i:=i+1;
  37.     y1:= WorldArray[i]; i:=i+1;
  38.     x := WorldArray[i]; i:=i+1;
  39.     y := WorldArray[i]; i:=i+1;
  40.     line (x1, y1, x, y, 1);
  41.     x1:= x; y1:= y;
  42.     for j:= 3 to n do
  43.     begin
  44.       x := WorldArray[i]; i:=i+1;
  45.       y := WorldArray[i]; i:=i+1;
  46.       line (x1, y1, x, y, 1);
  47.       x1:= x; y1:= y;
  48.     end;
  49.   n:= WorldArray[i]; i:=i+1;
  50.   until (n < 1);
  51. end.
  52.